
let arr = [ '瑞瑞' , '老王' , '娇娇' , '盼盼' , '雯雯' , '棋棋' ];

console.log( arr );

let index = arr.findIndex( e => e === '老王' );
arr.splice( index , 1 );

console.log( arr );

let fns = [];

fns.push( a => console.log( 'a' , a ) );
fns.push( b => console.log( 'b' , b ) );
fns.push( c => console.log( 'c' , c ) );

console.log( fns );

let h = b => console.log( 'b' , b );

index = fns.findIndex( fn => {
    return fn.toString() == h.toString() ;
});
console.log( index );
if( index != -1 ) {
    fns.splice( index , 1 );
}

console.log( fns );

for( let fn of fns ){
    fn.call( null );
}